module dtos.route;

class Meta
{
    string title;
    string icon;
    bool hidden = false;
    // bool alwaysShow = true;
    // string[] roles = ["ADMIN"];
    string[] roles = [];
    bool keepAlive = true;

    this(string title, string icon)
    {
        this.title = title;
        this.icon = icon;
    }

    this(string title, string icon, string[] roles)
    {
        this.title = title;
        this.icon = icon;
        this.roles = roles;
    }

    this(string title, string icon,
        bool hidden, string[] roles,
        bool keepAlive)
    {
        this.title = title;
        this.icon = icon;
        this.hidden = hidden;
        // this.alwaysShow = alwaysShow;
        this.roles = roles;
        this.keepAlive = keepAlive;
    }
}

class TopRouteDto
{
    string path;
    string component;
    string redirect;
    Meta meta;

    SubRouteDto[] children;
}

class SubRouteDto
{
    string path;
    string component;
    string name;
    Meta meta;
}
